/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.osdtsystem.options;

/**
 * A collection of classification parameters.
 * @author matthias
 */
public class CoverOptionsEngine implements CoverOptions {
    private int maxClassDepth, minClassCount;
    private double minRelativeClassSize;

    public CoverOptionsEngine() {
    }

    @Override
    public int maximalClassDepth() {
        return maxClassDepth;
    }

    @Override
    public int classificationMinClassCount() {
        return minClassCount;
    }

    @Override
    public double classificationMinRelativeClassSize() {
        return minRelativeClassSize;
    }

    @Override
    public void setClassificationMaxClassDepth(int maxClassDepth) {
        if (maxClassDepth < 0)
            throw new IllegalArgumentException("Illegal maxClassDepth: must be non-negative, but was " + maxClassDepth);
        this.maxClassDepth = maxClassDepth;
    }

    @Override
    public void setClassificationMinClassCount(int minClassCount) {
        this.minClassCount = minClassCount;
    }

    @Override
    public void setClassificationMinRelativeClassSize(double minRelativeClassSize) {
        if (minRelativeClassSize < 0 || minRelativeClassSize >= 1)
            throw new IllegalArgumentException("Invalid minRelativeClassSize: must be in the range [0,1[, but was " + minRelativeClassSize);
        this.minRelativeClassSize = minRelativeClassSize;
    }
}
